package easyhash

import (
	"strings"

	"github.com/tjfoc/gmsm/sm3"
)

// GMSM3 国密 sm3 哈希
func GMSM3(s string, salt []byte) string {
	h := sm3.New()
	result := MustEasyHash(h, strings.NewReader(s), salt)
	return Hex2Str(result)
}
